import request from '@/utils/request'


export function login(username, password) {
  // var qs = require('qs');
  // axios.post('/foo',);
  // debugger;
  return request({
    // url: '/user/login',
    url: '/api/login',
    method: 'post',
    params:
      { 'username': username,'password': password }
      // {
      // username,
      // password
    // }
  })
}

export function getInfo(token) {
  return request({
    // url: '/user/info',
    // method: 'get',
    // params: { token }
    url: '/api/sys/user/getUser',
    method: 'get',
    params:
      { 'AccessToken': token,'userId': 1 }
  })
}

export function logout(token) {

  return request({
    // url: '/user/logout',
    url: '/api/sys/logout',
    // method: 'post'
    method: 'post',
    params:
      { 'AccessToken': token }
  })
}
